using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using DG.Tweening;
using UnityEngine.SceneManagement;

public class LoadGame : MonoBehaviour
{
    public Button btn1;
    public Button btn2;

    public GameObject bg2;

    private void Start()
    {
        Soundmgr.Instance.PlayMusicByName("WOW",Camera.main.transform.position,0.4f);
        btn1.onClick.AddListener(() => { BgMove(); });
        
        btn2.onClick.AddListener(() => { LoadScene(); });
    }

    public void BgMove()
    {
        if(bg2 != null)
        {
            bg2.transform.DOLocalMoveY(0, 2);
        }
    }

    public void LoadScene()
    {
        Soundmgr.Instance.StopMusic();
        SceneManager.LoadScene(1);
    }

}
